import React, { PureComponent, Fragment } from 'react';
import {
  Form,
  Drawer,
  Col, Row,
} from 'antd';
import { phone, email } from '@/utils/regular';
import { connect } from 'dva';

@Form.create()
class UpdateForm extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {
      iconList: [],
    };
    this.formLayout = {
      labelCol: { span: 7 },
      wrapperCol: { span: 13 },
    };
  }


  //弹窗
  render() {
    const { afterView, handleAfterClick, afterInfo } = this.props;
    let data = afterInfo.msg || {};
    const DescriptionItem = ({ title, content }) => (
      <div
        style={{
          fontSize: 14,
          lineHeight: '22px',
          marginBottom: 7,
          color: 'rgba(0,0,0,0.65)',
        }}
      >
        <p
          style={{
            marginRight: 8,
            display: 'inline-block',
            color: 'rgba(0,0,0,0.85)',
          }}
        >
          {title}:
        </p>
        {content}
      </div>
    );

    return (<Drawer
      width={440}
      placement="right"
      closable={false}
      onClose={() => handleAfterClick(false, [])}
      visible={afterView}
    >

      <Row>
        <Col span={24}>
          <DescriptionItem
            title="逾期情况"
            content={data.amountStatus}
          />
        </Col>
      </Row>
      <Row>
        <Col span={24}>
          <DescriptionItem
            title="经营状况"
            content={data.enterpriseCondition}
          />
        </Col>
      </Row>
      <Row>
        <Col span={24}>
          <DescriptionItem
            title="还款能力"
            content={data.repayAbility}
          />
        </Col>
      </Row>
      <Row>
        <Col span={24}>
          <DescriptionItem
            title="逾期情况"
            content={data.overdueStatus}
          />
        </Col>
      </Row>
      <Row>
        <Col span={24}>
          <DescriptionItem
            title="涉诉情况"
            content={data.litigation}
          />
        </Col>
      </Row>

      <Row>
        <Col span={24}>
          <DescriptionItem
            title="处罚情况"
            content={data.punish}
          />
        </Col>
      </Row> <Row>
      <Col span={24}>
        <DescriptionItem
          title="开始时间"
          content={data.startTime}
        />
      </Col>
    </Row> <Row>
      <Col span={24}>
        <DescriptionItem
          title="结束时间"
          content={data.endTime}
        />
      </Col>
    </Row>


    </Drawer>);

  }
}

export default UpdateForm;
